<template>
    <div class="page-hire-find">
        <div class="banner">
            <van-swipe :autoplay="4000">
                <van-swipe-item @click.native="openPost">
                    <img src="@/assets/img/index/banner@3x.png" alt="">
                </van-swipe-item>
                <van-swipe-item @click.native="openPost">
                    <img src="@/assets/img/index/banner4.png" alt="">
                </van-swipe-item>
                <!-- <van-swipe-item @click.native="openPost">
                    <img src="@/assets/img/index/banner5.jpg" alt="">
                </van-swipe-item> -->
            </van-swipe>
            <div class="search">
                <van-icon name="location" class="lbs"/>
                <van-search placeholder="请输入搜索关键词" v-model="keyword" />
            </div>
        </div>
        <van-row class="menus">
            <van-col span="12" class="menu">
                <router-link :to="{name: 'designers'}">
                    <img src="@/assets/img/index/book@3x.png" height="24">
                    约设计师
                </router-link>
            </van-col>
            <van-col span="12" class="menu">
                <router-link :to="{name: 'advisers'}">
                    <img src="@/assets/img/index/adviser@3x.png" height="24">
                    顾问圈
                 </router-link>
            </van-col>
        </van-row>
        <div class="marquee">
            <i class="iconfont icon-notice"></i>
            <marquee direction="up" scrollamount="1">
                BOFAM布梵  ·坐享非凡 布梵沙发 <br />
                观朴 丨 大雅生活 小雅情趣——明式家具品鉴之旅 <br />
                云上设计师俱乐部 为南京设计力量发声 <br />
                中国书房   · 传播中华文化   重塑核心价值 <br />
                开洋木门 全屋定制美学 <br />
                南京冠德家具   办公、酒店家具服务商 <br />
                LA.BOBO陶瓷薄板  供应商 <br />
                金科●IF现代陶瓷 南京总代理
            </marquee>
            <a>更多</a>
        </div>

        <dl class="tasks">
            <dt class="title">设计师推荐</dt>
            <app-designers :data-source="dataList"></app-designers>
        </dl>
    </div>
</template>

<script>
import appDesigners from '../../component/designers'
import { designerList } from '../../api/designer'
export default {
    components: {
        appDesigners
    },
    data(){
        return {
            keyword: '',
            dataList: []
        }
    },
    methods: {
        getDataList(){
            designerList({
                pageNum: 1,
                pageSize: 100
            }).then(rsp => {
                if(rsp.code === 200){
                    this.dataList = rsp.data.list
                }
            })
        },

        openPost(){
            this.$router.push({name: 'post'})
        }
    },
    created(){
        this.getDataList()
    }
}
</script>

<style lang="less">
@import './style.less';
</style>

